/*
Date:20210528 21:26PM
key:第三次做，参数中放的两个是即将相等的两个，但是递归子结构要同时体现镜像这一点
 */
class Solution {
public:
    bool isSymmetric1(TreeNode* left1,TreeNode* right1) 
    {
        if(left1==NULL&&right1==NULL)
        {
            return 1;
        }
        else
        {
            if((left1!=NULL&&right1!=NULL)&&(left1->val==right1->val))
            {

                
                    return isSymmetric1(left1->left,right1->right)&&isSymmetric1(left1->right,right1->left);
                
                
            }
            {return 0;}
        }

    }
    bool isSymmetric(TreeNode* root) 
    {
        if(root==NULL){return 1;}
        else{return isSymmetric1(root->left,root->right);}

    }
};